import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
// 导入css文件
import '../../styles/allgoods/Input.css'

class Input extends Component {
    // 去到搜索页
    toSearch() {
        this.props.history.push({ pathname: '/search' })
    }
    render() {
        return (
            <div className='allgoods-input-box'>
                <span><h3>全部商品</h3></span>
                 <input type="text" placeholder='搜索店内商品' onClick={() => { this.toSearch() }}/>
            </div>
        );
    }
}

export default withRouter(Input);